<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>轩辕短信平台</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="Place your description here" />
		<meta name="keywords" content="put, your, keyword, here" />
		<meta name="author"
			content="cssMoban.com - website templates provider" />
		<link href="style.css" rel="stylesheet" type="text/css" />
		<link href="css/validator.css" rel="stylesheet" type="text/css" />
		
		<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
		<script src="js/jcarousellite.js" type="text/javascript"></script>
		<script type="text/javascript">
	$(document).ready(function() {
		$("a.new_window").attr("target", "_blank");
	});
</script>
		<!--[if lt IE 7]>
<script type="text/javascript" src="js/ie_png.js"></script>
<script type="text/javascript">
	ie_png.fix('.png, .carousel-box .next img, .carousel-box .prev img');
</script>
<link href="ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
	</head>
	<body id="page5">
		<div class="tail-top-left"></div>
		<div class="tail-top">
			<!-- header -->
			<div id="header">
				<div class="row-1">
					<div class="fleft">
						<a href="aboutUsAction"><img src="images/logo.gif" alt="" />
						</a>
					</div>
					<div class="fright">
						<ul>
							<li>
								<a href="indexAction"><b>主页</b>
								</a>
							</li>
							<li>
								<a href="seeUserAction" class="active"><b>用户管理</b>
								</a>
							</li>
							<li>
								<a href="sendMessageAction"><b>短信平台</b>
								</a>
							</li>
							<li>
								<a href="updateByPersonAction"><b>个人信息管理</b>
								</a>
							</li>
							<li>
								<a href="aboutUsAction"><b>关于我们</b>
								</a>
							</li>
						</ul>
					</div>
				</div>
				
			</div>
			<!-- content -->
			<div id="content">
				<div class="inner_copy">
					More
					<a href="http://www.cssmoban.com/">Website Templates</a> at
					TemplateMonster.com!
				</div>
				<div class="row-1">
					<div class="inside">
						<div class="container">
							<div class="aside">
								<h3 style="font-size:28px;hine-height:1.2em;text-align:left;">
									功能
								</h3>
								<ul>
									<li>
										<img src="images/pic1.gif" alt="" />
										<div class="extra-wrap">
											<span style="width: 80px"><a href="seeUserAction">用户列表</a> </span>
										</div>
									</li>
									<li>
										<img src="images/pic2.gif" alt="" />
										<div class="extra-wrap">
											<span style="width: 80px"><a href="selectUserAction">用户查询</a> </span>
										</div>
									</li>
									<li>
										<img src="images/pic3.gif" alt="" />
										<div class="extra-wrap">
											<span style="width: 80px"><a href="addUserAction">用户添加</a> </span>
										</div>
									</li>
									
									<li>
										<img src="images/pic5.gif" alt="" />
										<div class="extra-wrap">
											<span style="width: 80px"><a href="updatePassAction">修改密码</a> </span>
										</div>
									</li>
								</ul>
							</div>
							<div class="content">
								<h3>
									修改密码
								</h3>
								<div class="txt3">
									<form id="validator-form" action="javascript:updatePass()">
										<fieldset class="field-wrap">
											<div class="field-item">
												<label for="username">
													旧密码：
												</label>
												<input id="oldPass" name="oldPass" class="input-item"
													type="text" maxlength="20" />
											</div>
											<div class="field-item">
												<label for="password">
													登录密码：
												</label>
												<input id="password" name="password" class="input-item"
													type="password" maxlength="20" />
											</div>

											<div class="field-item">
												<label for="confirm-password">
													确认密码：
												</label>
												<input id="confirm-password" class="input-item"
													name="confirm-password" maxlength="20" type="password" />
											</div>
											
											<div class="field-item center"><div><table><tr><td width="73%"></td><td width="73%"><input type="submit" value="添加" style="width:80px;height:33px;border:1px solid #DCDCDC;background:#518d08;float:100px;" /></td></tr></table></div>
											</div>
										</fieldset>
									</form>

								</div>
							</div>
							<div class="clear"></div>
						</div>
					</div>
				</div>
				<div class="tail-middle">
			<div class="row-2">
				<div class="inside">
					
					<div class="indent">
						<div class="box1">
							<div class="border-top">
								<div class="border-bot">
									<div class="left-top-corner">
										<div class="right-top-corner">
											<div class="right-bot-corner">
												
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
			</div>
			<!-- footer -->
			<div id="footer">
				<div class="footer">
					版权所有 广东轩辕网络科技股份有限公司 电话：020-85285889 传真：020-85285329
				</div>
			</div>
		</div>
	</body>
</html>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type='text/javascript' src='dwr/interface/userAction.js'></script>
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jcarousellite.js" type="text/javascript"></script>
<script type="text/javascript" src="js/yui.js"></script>
<script type="text/javascript" src="js/yui.validator.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
	  $("a.new_window").attr("target", "_blank");
	});
	
	function updatePass(){
	  var oldPass = $("#oldPass").val();
	  var password = $("#password").val();
	  userAction.updatePass(password,oldPass,function(data){
	      if(data == false){
	        alert("旧密码不正确 请重新确认.");
	      } else {
	        alert("修改成功 .");
	      }
	  });
	}
	
	/*表单验证 */
(function(){	
	
		Validator = YUI.Validator, 
	Validator.setup({
		"form": "validator-form"
	}).add({
	    "target": "oldPass",
		"rule": "password",
		"fn": function(){
			return true;
		}
	}).add({
		"target": "password",
		"rule": "password",
		"plus": true
	}).add({
		"target": "confirm-password",
		"rule": "password",
        "to": "password" 
	});
})();	

</script>
